<% @main_header = "#{link_to('Ptrack:', '/')} #{@project.name if @project}: Contacts" %>

  <div style="float: left; width: 100%;">
  	<fieldset>
	<legend>All Contacts</legend>
	<table>
	<tr>
		<td style="font-weight: bold;">
			Name
		</td>
		<td style="font-weight: bold;">
			Surname
		</td>
		<td style="font-weight: bold;">
			Company
		</td>
		<td style="font-weight: bold;">
			Phone
		</td>
		<td style="font-weight: bold;">
			Email
		</td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td colspan="8">
			<hr>
		</td>
	</tr>
	<% for contact in @contacts %>
  	<tr>
    <td><%=h contact.name %></td>
    <td><%=h contact.surname %></td>
	<td><%=h contact.company %></td>
	<td><%=h contact.phone %></td>
	<td><%=h contact.email %></td>
	
    <td><%= link_to "Show", :action => "show", :id => contact %></td>
	<td><%= link_to "Edit", :action => "edit", :id => contact%></td>
	<td><%= link_to("Delete", {:action => "destroy", :id => contact}, :method => :delete, :confirm => "Are you sure want to delete #{contact.full_name} ?")%></td>
	</tr>
  
	<% end %>
	</table>
  	</fieldset>
	<p>
	<%= link_to "Previous page", :action => "index" %>
	</p>
  </div>
